package net.sourceforge.wurfl.core.request.normalizer.specific;

import net.sourceforge.wurfl.core.request.normalizer.UserAgentNormalizer;

public class KonquerorNormalizer implements UserAgentNormalizer {

	
	/**
	 * Return the Konqueror user agent with the major version		
	 *  
	 * e.g 
	 * 	Mozilla/5.0 (compatible; Konqueror/4.1; Linux) KHTML/4.1.2 (like Gecko) -> Konqueror/4
	 * 		
	 * @param userAgent
	 * @return String
	 */
	public String normalize(String userAgent) {
		return konquerorWithMajorVersion(userAgent);
	}
	
	private String konquerorWithMajorVersion(String userAgent) {
		int index = userAgent.indexOf("Konqueror");
		return userAgent.substring(index, index+10);
	}

	
	

}
